﻿using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace StationDemo.设备信息.data
{

    public enum StationStatus
    {
        /// <summary>
        /// 没料
        /// </summary>
        NoProduct = 0,

        /// <summary>
        /// 有料无法测试
        /// </summary>
        HavaCantTest,

        /// <summary>
        /// 等待右测试
        /// </summary>
        WaitTestRight,

        /// <summary>
        /// 等待测试对面
        /// </summary>
        WaitTestOpposite,

        /// <summary>
        /// 等待左测试
        /// </summary>
        WaitTestLeft,

        /// <summary>
        /// 测试完成
        /// </summary>
        EndTest,
    }

    public class StationData
    {
        public string StationName { get; set; } = "A";


        #region 工位维护

        // 单工位是否已经完成测试
        public bool IsSingleStationEnd { get; set; } = false;

        [JsonConverter(typeof(StringEnumConverter))]
        public StationStatus Status { get; set; } = StationStatus.NoProduct;

        public TestResult TestResult { get; set; } = new TestResult();
        
        #endregion
    

        public StationData(string stationName)
        {
            StationName = stationName;
        }
    }
}
